<template>
    <ui-main :title="$route.name">
        <div class=" item flex-1">
            <el-input v-model="val"></el-input>
            检索关键字: {{searchVal}}
        </div>
        <div class=" item flex-5">
            <ui-load-md file="./debounce.md"></ui-load-md>
        </div>
    </ui-main>
</template>
<script>
    export default {
        data() {
            return {
                val: '',
                searchVal: ''
            }
        },
        watch: {
            val(v) {
                this.$bui.debounce(() => {
                    this.searchVal = this.val
                }, 1000)
            }
        }
    }
</script>
